<div id="app-container" class="container" myapp="STORE_WECHAT_INFOS_EDIT">

  <div class="app">
     <div class="app-inner clearfix">
      <div class="widget-list-filter">
        <%= link_to "添加管理员", new_ems_store_staff_path, class: 'ui-btn ui-btn-success' %>
        <p class="help-block error-message flash-notice" style=""> <%= notice %></p>
      </div>
         <table id="wechat_table" class="ui-table ui-table-list">
          <thead>
              <tr>
                <th>
                  #
                </th>
                <th>
                  姓名
                </th>
                <th>
                  部门
                </th>
                <th>
                  职位
                </th>
                <th>
                  员工编号
                </th>
                <th>
                  状态
                </th>
                <th title="仅在本单位工作年限">
                  工龄
                </th>
                <th>
                  手机号
                </th>
                <th>
                  操作
                </th>
              </tr>
          </thead>
          <tbody>
              <% @store_staffs.each_with_index do |staff, i| %>
                <tr>
                  <td>
                    <%= i + 1 %>
                  </td>
                  <td>
                    <%= staff.full_name %>
                  </td>
                  <td>
                    <%= staff.store_department_name %>
                  </td>
                  <td>
                    <%= staff.store_position_name %>
                  </td>
                  <td>
                    <%= staff.numero %>
                  </td>
                  <td>
                    <%= staff.status_i18n %>
                  </td>
                  <td>
                    <%= staff.work_year %>
                  </td>
                  <td>
                    <%= staff.phone_number %>
                  </td>
                  <td>
                    <%= link_to '删除', ems_store_staff_path(staff), method: :delete, data: {confirm: "确认删除吗?"} %>

                    <%= link_to '编辑', edit_ems_store_staff_path(staff) %>


                    <% if current_user.admin.present? %>
                      <%= link_to '重置密码', "#", class: 'js-staff-to-reset-pwd', data: {id: staff.id, store_id: staff.store_id} %>
                    <% end %>

                    <%= link_to '记录', ems_store_staff_records_path(staff) %>
                  </td>
                </tr>
              <% end %>
          </tbody>
        </table>
      </div>
  </div>

</div>
